<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加一个律师信息</title>

<style type="text/css" media="all">
    .allow-float {clear:none!important;} /* 允许该元素浮动 */
    .stop-float {clear:both!important;} /* 阻止该元素浮动 */
	.float-left {float:left;padding-left:5px}   /*浮动到左边*/
  </style>

  <script type="text/javascript">
	Ext.onReady(function(){

		var sexdatas=[{id:'男',name:'男'},{id:'女',name:'女'}];

		var sexstore=new Ext.data.JsonStore({ data:sexdatas,fields:["id","name"]});

		var popedomdatas=[{id:'01',name:'系统管理员'},{id:'02',name:'老板'},{id:'03',name:'律师'}];

		var popedomstore=new Ext.data.JsonStore({data:popedomdatas,fields:["id","name"]});

		var positiondatas=[{id:'01',name:'主任'},{id:'02',name:'律师'},{id:'03',name:'兼职律师'}];

		var positionstore=new Ext.data.JsonStore({data:positiondatas,fields:["id","name"]});

		var addLawyerInfoWin=new Ext.form.FormPanel({
			title:'添加一位律师信息',
			buttonAlign:'center',
			labelSeparator :'：',//分隔符
			labelWidth : 100,//标签宽度
			bodyStyle:'padding:5',//表单边距
			frame : true,
			collapsible: true,
			height:350,
			width:window.screen.width-320,
			applyTo :'addLawyerInfo',
			defaults : {
            width : 230
        },
        defaultType : 'textfield',
        items : [
        {
            fieldLabel : '律师姓名',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alawyername',
            id :'alawyername',
            allowBlank :false
        },
        {
        	xtype:'datefield',
            fieldLabel :'出生年月',
			format:'Y-m-d',
			id :'abirthtime',
			name :'abirthtime',
			itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
			allowBlank :true
        },
        new Ext.form.ComboBox({
			fieldLabel:'请选择性别',
			itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
			store:sexstore,
			valueField:'id',
			displayField:'name',
			mode:'local',
			forceSelection:true,
			emptyText:'请选择性别',
			hiddenName:'sex',
			editable:false,
			triggerAction:'all',
			id:'alawyersex',
			name:'alawyersex'
			}),
        {
            fieldLabel : '政治面貌',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'apoliticalstatus',
            id:"apoliticalstatus",
            allowBlank : false
        },
        {
            fieldLabel : '执业证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'abusinessnumber',
            id:"abusinessnumber",
            allowBlank : false
        },
         {
            fieldLabel : '诚信档案',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'ahonestarchives',
            id:"ahonestarchives",
            allowBlank : false
        },
        {
            fieldLabel : '联系方式',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alawyerphone',
            id:"alawyerphone",
            allowBlank : false
        },
        {
            fieldLabel : '文化程度',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'aeducationallevel',
            id:"aeducationallevel",
            allowBlank : false
        },
         {
            fieldLabel : '身份证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'aidentitynumber',
            id:"aidentitynumber",
            allowBlank : false
        },
         {
            fieldLabel : '年检注册情况',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'aannsurreginfo',
            id:"aannsurreginfo",
            allowBlank : false
        },
		 new Ext.form.ComboBox({
			fieldLabel:'请选择职位名',
			itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
			store:positionstore,
			valueField:'id',
			displayField:'name',
			mode:'local',
			forceSelection:true,
			emptyText:'请选择职位名',
			hiddenName:'lawyerposition',
			editable:false,
			triggerAction:'all',
			id:'alawyerposition',
			name:'alawyerposition'
			}),
         {
            fieldLabel : '毕业院校',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'agraduateschool',
            id:"agraduateschool",
            allowBlank : false
        },
         {
            fieldLabel : '邮箱',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alawyeremail',
            id:"alawyeremail",
            allowBlank : false
        },
		{
        	xtype:'datefield',
            fieldLabel :'入所时间',
			format:'Y-m-d',
			id :'alcometime',
			name :'alcometime',
			itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
			allowBlank :false
        },
		{
        	xtype:'datefield',
            fieldLabel :'离所时间',
			format:'Y-m-d',
			id :'alleavetime',
			name :'alleavetime',
			value:"1990-01-01",
			itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
			allowBlank :true
        },
		 {
            fieldLabel : '异动情况',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alachriveinfo',
            id:"alachriveinfo",
            allowBlank : false
        },
		 {
            fieldLabel : '户籍所在地',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alhouseholdaddr',
            id:"alhouseholdaddr",
            allowBlank : false
        },
		 {
            fieldLabel : '档案所在地',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'alachriveaddr',
            id:"alachriveaddr",
            allowBlank : false
        },
		 {
            fieldLabel : '资格证号',
            itemCls:'float-left',//向左浮动
			clearCls:'allow-float',//允许浮动
            name :'aleligiblenumber',
            id:"aleligiblenumber",
            allowBlank : false
        }
        // new Ext.form.ComboBox({
		//	fieldLabel:'请选择权限',
			//itemCls:'float-left',//向左浮动
			//clearCls:'allow-float',//允许浮动
		//	store:popedomstore,
		//	valueField:'id',
		//	displayField:'name',
		//	mode:'local',
		//	forceSelection:true,
		//	emptyText:'请选择权限',
		//	hiddenName:'lawyerpopedom',
		//	editable:false,
		//	triggerAction:'all',
		//	id:'alawyerpopedom',
		//	name:'alawyerpopedom'
		//	})
        ],

        buttons : [ {
            text : '添加',
			iconCls:'useradd',
            disabled : false,
            handler : function() {
                if (addLawyerInfoWin.form.isValid()) {
                    addLawyerInfoWin.form.submit( {
                        url : 'AddLawyerInfo.jsj',
                        success : function(from, action) {
                         Ext.MessageBox.alert('结果', action.result.message);
                        },
                        failure : function(form, action) {
                           Ext.MessageBox.alert('结果', action.result.message);
                        },
                        waitMsg : '正在保存数据，稍后...'
                    });
                } else {
                    Ext.Msg.alert('信息', '请填写完成再提交!');
               }
            }
        }
        ]
		})
	})

  </script>
</head>
<body>
<table>
	<tr>
		<td>
		<div id='addLawyerInfo' style="margin: 8px 8px 4px 8px"></div>
		</td>
	</tr>
</table>
</body>
</html>